import { Button } from 'antd';
import React, { FC } from 'react';
import { useNavigate } from 'react-router-dom';

const Home: FC = () => {

    const nav = useNavigate();

    const clickHandler = () => {
        nav("/login")
    }

    return <>
        <div>
            <Button type='primary' onClick={clickHandler}>AntD button</Button>
            <button onClick={clickHandler}>登录</button>
        </div>
    </>
}

export default Home